1. Field of the Invention
The present invention relates to a debugging scheme, and more particularly, to an In-Circuit Debugging system and related method for debugging a program code running on a target system.
2. Description of the Prior Art
In-Circuit Debugging schemes are used for developing and debugging program codes running on target systems on chips. Please refer to FIG. 1. FIG. 1 is a diagram of a conventional In-Circuit Debugging (ICD) system 10. The ICD system 10 includes a target system 15 having a target central processing unit (CPU) 20, a debug host 25 having debug software, and an ICD bridge 30. An embedded debug module (EDM) 35 is integrated within the target CPU 20 and utilized for controlling and observing the target CPU 20 for debugging purposes. A host debug module (HDM) 40 integrated within the ICD bridge 30 provides accessibility to the EDM 35 for the debug host 25. The ICD bridge 30 is used for transferring information between the target system 15 and the debug host 25 in debug mode. In addition, the EDM 35 communicates with the HDM 40 via a communication channel such as JTAG interface. A programmer uses the debug software on the debug host 25 to debug a program code running on the target system 15 through the ICD bridge 30, the HDM 40, and the EDM 35, wherein the HDM 40 and EDM 35 communicate with each other via a joint Test Action Group interface (JTAG interface); the JTAG interface is well known to one skilled in the art and is not detailed here for brevity.
A description pertaining to In-Circuit Emulators used for debugging program codes running on a processor of a target system is disclosed in U.S. Pat. No. 5,640,542. According to the abstract of this patent, a pair of In-Circuit-Emulator modules are embedded within a microprocessor to implement parts of an In-Circuit-Emulator system. For the first In-Circuit-Emulator module, the In-Circuit-Emulator memory mapping module maps specified physical addresses into a debug memory. The physical addresses mapped into the debug memory are set by programmable registers. For the second In-Circuit-Emulator module, the In-Circuit-Emulator breakpoint module allows the user to set conditions that cause the processor to recognize specific bus events. The In-Circuit-Emulator breakpoint module monitors an internal bus and an internal bus controller. The user can set specific bus event conditions by writing to a set of breakpoint registers in the breakpoint module. Further description is not detailed here.